/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.sharedbills.client.gin;

import org.jb.sharedbills.client.ApplicationViewPort;
import org.jb.sharedbills.client.form.ActionPanel;
import org.jb.sharedbills.client.form.BillPanel;
import org.jb.sharedbills.client.form.GroupPanel;
import org.jb.sharedbills.client.form.MemberPanel;
import org.jb.sharedbills.client.form.MessagePanel;
import org.jb.sharedbills.client.form.SavePanel;
import org.jb.sharedbills.client.form.TitlePanel;

import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.google.gwt.inject.client.AbstractGinModule;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;


public class ViewModule extends AbstractGinModule {

	@Override
	protected void configure() {
		bind( Viewport.class ).to( ApplicationViewPort.class );
		bind( ContentPanel.class ).annotatedWith(MemberType.class).to(MemberPanel.class);
		bind( ContentPanel.class ).annotatedWith(BillType.class).to(BillPanel.class);
		bind( ContentPanel.class ).annotatedWith(GroupType.class).to(GroupPanel.class);
		bind( ContentPanel.class ).annotatedWith(ActionType.class).to(ActionPanel.class);
		bind( ContentPanel.class ).annotatedWith(MessageType.class).to(MessagePanel.class);
		bind( Widget.class ).to(TitlePanel.class);
		bind( Image.class ).to( SavePanel.class );
	}

}
